//
//  GSFacebook.h
//  AgileNYC
//
//  Created by German on 26.06.14.
//  Copyright (c) 2014 Softlegion. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <FacebookSDK/FacebookSDK.h>

typedef void(^GSImageReceivedBlock)(NSData * userImage);

@interface GSFacebook : NSObject <FBLoginViewDelegate>

-(void) connectToFacebook: (void(^)(BOOL result)) completionBlock;

- (void)requestUserInfo:(int) reserved
              onSuccess:(void(^)(NSDictionary * userInfo)) success
              onFailure:(void(^)(NSError * error)) failure;

- (void)requestUserInfoWithImageHeight:(NSInteger) height
                                 Width:(NSInteger) width
                             onSuccess:(void(^)(NSDictionary * userInfo)) success
                       onImageReceived:(void(^)(NSData* userImage)) imageReceived
                             onFailure:(void(^)(NSError * error)) failure;
- (void)requestUserImageUrlWithWidth:(NSInteger) width
                              Height:(NSInteger) height
                           onSuccess:(void(^)(NSDictionary * userInfo)) success
                           onFailure:(void(^)(NSError * error)) failure;

- (void)openProfilePage:(NSString*) url
              onSuccess:(void(^)(NSDictionary * userInfo)) success
              onFailure:(void(^)(NSError * error)) failure;
@end
